<?php
$this->Html->addCrumb('Admin Login');
//css
echo $this->Html->css(array('tws-framework', 'jquery-ui-1.8.15.custom','jquery.cluetip'), false);
 //plugins
 echo $this->Html->script(array('plugins/jquery.validate.min','plugins/additional-methods','plugins/custom-validation-methods','plugins/jquery.maskedinput-1.3','plugins/jquery.timeentry.min','plugins/jquery-ui-1.8.15.custom.min','plugins/jquery.cluetip','plugins/jquery.hoverIntent.min','plugins/jquery.form','plugins/jquery.blockUI'), false);
 //custom plugins
 echo $this->Html->script(array('mylibs/tws_console','mylibs/tws_form','mylibs/tws_overlay'), false);

?>
<?php
$this->Html->scriptStart(array('inline' => false));
echo '
      $(function(){
        $("#SecurityLoginForm").TWS_Form( {
          validate : {
          rules : {
            SecurityEmail : {required : true, email : true},
            SecurityPassword: {required : true}
          }
          }});
        });
       ';
$this->Html->scriptEnd();
?>

<h1 class="pageTitle">Admin Login</h1>
<?php echo $this->Session->flash();?>
<div class="floatingFormContainer">
<?php echo $this->element('errors', array('errors' => isset($errors)? $errors : null)); ?>

<?php
echo $this->TWSForm->create('Security',  array(
    'inputDefaults' => array(
        'div' => array('class'=>'row')),
        'url'=> array('controller'=>'security','action'=>'login'),
        'class'=>'inlineForm'));
echo $this->TWSForm->input('email', array('name'=>'SecurityEmail', 'type'=>'text', 'label'=>'<span class="required">*</span>Email'));
echo $this->TWSForm->input('password', array('name'=>'SecurityPassword', 'type'=>'password', 'label'=>'<span class="required">*</span>Password'));
echo $this->TWSForm->end( array("label"=>"Submit", "class"=>"button"));

?>

  <ul>
    <li><?php echo $this->Html->link('Forgot your username and password',"/forgot-password") ?></li>
    <li><?php echo $this->Html->link('Register Now',"/register") ?></li>
  </ul>

</div>